﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace YXShop.Web.admin.templates.label
{
    public partial class articlelist_parameter : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {  
            if(!IsPostBack)
            {
                InitWebControl();
                YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
                bll.GetDropList(this.classId_droplist, this.channelId_droplist.SelectedValue);
                bll = null;
                this.classId_droplist.Items.Insert(0, new ListItem("→顶级类别", "0"));
            }
           
        }

        private void InitWebControl()
        {
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            bll.GetStairList(this.channelId_droplist,"10");
            bll = null;
            this.channelId_droplist.Items.Insert(0, new ListItem("→所有频道", "0"));
           
        }

        protected void channelId_droplist_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.classId_droplist.Items.Clear();
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            bll.GetDropList(this.classId_droplist, this.channelId_droplist.SelectedValue);
            bll = null;
            this.classId_droplist.Items.Insert(0, new ListItem("→顶级类别", "0"));
        }

      
    }
}
